package com.example.food_contract_system.mapper;

import com.example.food_contract_system.domain.Food;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Lhy
* @description 针对表【food】的数据库操作Mapper
* @createDate 2023-07-06 09:22:12
* @Entity com.example.food_contract_system.domain.Food
*/
@Mapper
public interface FoodMapper extends BaseMapper<Food> {

    List<Food> selectByKey(@Param("name") String name, @Param("type") String type);

    List<Food> selectByName(@Param("name") String name);

    List<Food> selectByType(@Param("type") String type);

    int updateByIdMyself(@Param("food") Food food);

    int deleteByIdByMyself(@Param("id") Integer id);

    void updateNum(@Param("fId") Integer fId, @Param("oNum") Integer oNum);

    void updateStatus(@Param("s") String s, @Param("fId") String fId);
}




